{include file='public/head' /}
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
      <div class="row">
        <div class="col-md-5">
          <h1 class="page-header">用户信息修改</h1>
          <form action="{:url('edits')}" method="post" autocomplete="off">
            <div class="form-group">
              <label for="category-name">用户名</label>
              <input type="text" name="username" class="form-control" value="{$data.username}" required autocomplete="off" id="username">
            </div>  
            <div class="form-group">
              <label for="category-alias">密码</label>
              <input type="password" name="password" class="form-control" placeholder="请输入密码">
             </div>

            <div class="form-group">
             <label for="category-name">代理</label>
            <select name="vip">
              {if condition = "$data.vip eq 1"}
                  <option value="1" selected>会员</option>
                  <option value="2">代理</option>
                {else/}
                  <option value="1">会员</option>
                  <option value="2" selected>代理</option>
                {/if}
            </select>
          </div>

          <div class="form-group">
             <label for="category-name">上级</label>
              <select name="pid">
                {volist name="dailidata" id="vos"}
                  {if condition = "$data.pid eq 0"}
                      <option value="">{$vos.pid}请选择</option> 
                  {/if}
                  <option {if condition="$vos.uid eq $data.pid"}selected = selected{/if} value="{$vos.uid}">{$vos.username}</option>
                {/volist}

              </select>
          </div>
              
             <input type="hidden" name="uid" value="{:input('param.uid')}">
             <button class="btn btn-primary" type="submit" id="btn">确认</button>
             <button class="btn btn-primary" type="reset" name="submit">清除</button>
          </form>
        </div>
      </div>
    </div>
  </div>
</section>
</body>
</html>
<script type="text/javascript">
  $("#btn").click(function(){
      var username = $("#username").val();
      var password = $("#password").val();
      // if(!(/^[a-zA-Z][a-zA-Z0-9_-]{5,15}$/).test(username)){
      //   alert("请输入字母开头的6-15位字母、数字、下划线");
      //   return false;
      // }
      // if(!(/^[a-zA-Z0-9_-]{6,20}$/).test(password)){
      //   alert("请使用6-20位英文，数字及下划线组合");
      //   return false;
      // }
      
  })
</script>